<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<!-- 我是注释 -->
		我是文本, 呵呵呵

		<div class="box">哈哈哈</div>
		<ul>
			<li>1</li>
			<li>2</li>
			<li>3</li>
			<li>4</li>
			<li>5</li>
		</ul>

		<script>
			var bodyEl = document.body

			// 根据body元素获取子元素
			var childElements = bodyEl.children
			console.log('childElements', childElements)

			// 获取box
			var boxEl1 = bodyEl.firstElementChild
			var boxEl2 = bodyEl.children[0]
			console.log('boxEl1, boxEl2', boxEl1, boxEl2)

			// 获取ul
			var ulEl = boxEl1.nextElementSibling
			console.log('ulEl', ulEl)
		</script>
	</body>
</html>
